package display;

import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 *@author Lei
 */

public class DemoServer {
	public static void main(String [] args){
		
		try {
			Registry registry = LocateRegistry.getRegistry();
			display.RMIServer display=(display.RMIServer) registry.lookup("display1");
			display.displayInfo("hahaha");
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NotBoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}